import { useEffect, useLayoutEffect } from 'react'

const isBrowser = !!(typeof window !== 'undefined' && window.document && window.document.createElement)

const useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect

export { useIsomorphicLayoutEffect }
